package com.lkbaby.home.service.impl;

import com.lkbaby.home.dao.BannerDao;
import com.lkbaby.home.entity.Banner;
import com.lkbaby.home.service.BannerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * (Banner)服务接口实现层
 *
 * @author makejava
 * @since 2022-09-21 09:41:53
 */
@Service
public class BannerServiceImpl implements BannerService {

	@Resource(type = BannerDao.class)
	private BannerDao bannerDao;

	@Override
	public Banner queryBanner() {
		return bannerDao.selectOne(null);
	}

	@Override
	public boolean updateBanner(Banner banner) {
		if (banner == null) {
			return false;
		}
		return bannerDao.updateById(banner) > 0;
	}
}

